package com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.diudiutechnology.www.yadiudiu.R;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/8/24.
 * 添加商品
 */

public class AddGoodsActivity extends Activity implements View.OnClickListener {
    @Bind(R.id.retur)
    LinearLayout retur;

    Context context;
    @Bind(R.id.classification_layout)//分类
    RelativeLayout classification_layout;
    @Bind(R.id.Add_the_goods_layout)//添加商品
    RelativeLayout Add_the_goods_layout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_goods);
        ButterKnife.bind(this);
        context=this;
        initView();
    }

    private void initView() {
        retur.setOnClickListener(this);
        classification_layout.setOnClickListener(this);
        Add_the_goods_layout.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.retur:
                finish();
                break;
            case R.id.classification_layout:// 分类
                startActivity(new Intent(context,ClassificationActivity.class));
                break;
            case R.id.Add_the_goods_layout://添加商品
              Intent intent=  new Intent(context,AddTheGoodsActivity.class);
                intent.putExtra("pos","0");
                startActivity(intent);
                break;
        }
    }
}
